LangGraph

Miguel Conde

2025-02-07

Basics

Resources

FAQ

LangGraph stack

Control Flows

Agents

Many kinds of agents

The challenge

What is LangGraph for?

Basic demo

ReAct, a general agent architecture.

  • act - let the model call specific tools
  • observe - pass the tool output back to the model
  • reason - let the model reason about the tool output to decide what to do next (e.g., call another tool or just respond directly)

Advanced topics

Advanced topics

  • Messages: trim, filter, summarize
  • External memory
  • Human-in-the-loop
    • Streaming:
      • Sync and async methods / “updates” and “values” modes
      • Messages / tokens

More Advanced topics

  • More Human-in-the-loop
    • Breakpoints: a simple way to stop the graph at specific steps.
      • To await user approval before executing the next node.
      • To modify the graph state (editing) and introduce human feedback.
      • Can be conditionally triggered (dynamic breakpoints)

And more Advanced topics

  • More Human-in-the-loop
    • Support for debugging: viewing, re-playing, and even forking from past states (time travel)


  • Parallelization
  • Sub-graphs
  • Map-Reduce

Demo - Research assistant

Demo - Research assistant

Demo - Research assistant

Memory

Short and Long-Term Memory

Long-Term_Memory.pdf

Short Term Memory

Long Term Memory

When to update long-term memory

Memory store

ToDos Agent

Deployment

Components

Components

  • CLI: Builds Docker image w/ code for the server, your graph, and dependencies
  • Server
    • HTTP worker: Client communication, creating run ID for requests to execute graph (e.g., invoke, stream)
    • Queue worker: Executing the graph
  • Databases
    • Redis: Communication between workers (streaming, run cancellation)
    • Postgres: Support for short / long-term memory, task queue
  • Studio
    • LangGraph Cloud and Studio: Use the CLI to build the Docker image for you
  • Clients

Production

Bonus